import request from '../utils/request.js'
/**
 * 获取搜索联想建议
 * @param {*} q 根据联系字段获取联想建议
 */
export const getSearchSuggestion = (q) => {
  return request({
    method: 'GET',
    url: '/app/v1_0/suggestion',
    params: {
      q
    }
  })
}

/**
 * 搜索结果
 * @param {q,page,per_page} params 获取搜索结果参数
 */
export const getSearchResults = params => {
  return request({
    method: 'GET',
    url: '/app/v1_0/search',
    params
  })
}
